import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus';
import locale from "element-plus/es/locale/lang/zh-cn";
import App from './App.vue'
window.addEventListener('message', (event) => {
  window._deptObj=JSON.parse(event.data.deptObj)
  window._info=JSON.parse(event.data.info)
})
import router from './router'
import '@/utils/flexible.js'


const app = createApp(App)

app.use(ElementPlus, {locale});
app.use(createPinia())
app.use(router)

app.mount('#app')
// 您需要从 @element-plus/icons-vue 中导入所有图标并进行全局注册。
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}